From: Jian-Hong Pan Date: Mon, 12 Dec 2022 07:21:23 +0000 (+0800) Subject: data: Lower down gnome-shell process' OOM score X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~405^2^2~203 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=09c8fb541484f34a496809bc1c5708c90e9cb65c;p=gnome-shell.git data: Lower down gnome-shell process' OOM score When GNOME shell runs on a less memory system (for example 3 GB RAM), it is usually killed by the kernel OOM-killer easily. Because, it has a higher OOM score. However, GNOME desktop environment cannot do anything when the GNOME shell is killed. This commit adjusts and lowers down gnome-shell process' OOM score to avoid being killed by the kernel OOM-killer too early. In other words, sacrifices other processes first. Part-of: --- diff --git a/data/org.gnome.Shell@wayland.service.in b/data/org.gnome.Shell@wayland.service.in index 38887eb19..76d5ccb1b 100644 --- a/data/org.gnome.Shell@wayland.service.in +++ b/data/org.gnome.Shell@wayland.service.in @@ -32,3 +32,6 @@ ExecStopPost=-/bin/sh -c 'test "$SERVICE_RESULT" != "exec-condition" && systemct Restart=no # Kill any stubborn child processes after this long TimeoutStopSec=5 + +# Lower down gnome-shell's OOM score to avoid being killed by OOM-killer too early +OOMScoreAdjust=-1000 diff --git a/data/org.gnome.Shell@x11.service.in b/data/org.gnome.Shell@x11.service.in index 7310f6608..078d87a3c 100644 --- a/data/org.gnome.Shell@x11.service.in +++ b/data/org.gnome.Shell@x11.service.in @@ -37,3 +37,6 @@ Restart=always RestartSec=0ms # Kill any stubborn child processes after this long TimeoutStopSec=5 + +# Lower down gnome-shell's OOM score to avoid being killed by OOM-killer too early +OOMScoreAdjust=-1000